package com.heima.wemedia;

import com.heima.aliyun.scan.GreenScan;
import com.heima.aliyun.scan.ScanResult;
import org.junit.jupiter.api.Test;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.test.context.SpringBootTest;

@SpringBootTest
public class SecurityDemo {
    @Autowired
    GreenScan greenScan;
    @Test
    public void textScan(){
        try {
            ScanResult scanResult = greenScan.greenTextScan("不要碰冰毒,呢是毒品");
            System.out.println(scanResult);
        } catch (Exception e) {
            e.printStackTrace();
        }
    }

    @Test
    public void test2( ){
        System.out.println(greenScan.getAccessKeyId());
        System.out.println(greenScan.getSecret());
    }
}
